Imports System.IO
Imports System.Xml.Xsl

Public Class StyleSheet

    Public ReadOnly KeyFilter As XslCompiledTransform
    Public ReadOnly ToolFilter As XslCompiledTransform
    'Public ReadOnly InfolistFilter As XslCompiledTransform
    Public ReadOnly FilelistXsl As XslCompiledTransform

    Public Sub New(ByVal xslFolder As String)

        KeyFilter = CompileTransform(Path.Combine(xslFolder, "keyFilter.xsl"))
        ToolFilter = CompileTransform(Path.Combine(xslFolder, "toolFilter.xsl"))
        'InfolistFilter = CompileTransform(Path.Combine(xslFolder, "infolistFilter.xsl"))
        FilelistXsl = CompileTransform(Path.Combine(xslFolder, "filelist.xsl"))

    End Sub

    Private Function CompileTransform(ByVal xslUri As String) As XslCompiledTransform

        Dim trans As New XslCompiledTransform()
        trans.Load(xslUri)

        Return trans

    End Function
End Class
